import {post,localpost,localget} from '@/apis/ajax.js'

//接口案例
export function apiexample(data) {
    return post('/api/example', data);
}

//获取登录信息
export function getUserInfo() {
    return post('/api/getUserInfo');
}
//获取用户订单
export function getUserOrderList(data) {
    return post('/api/getUserOrderList',data);
}
//初始化-首页-推荐栏
export function getIndexRecommendGoods() {
    return post('/api/getIndexRecommendGoods');
}
//初始化-首页-旗舰栏的商店图片
export function getIndexBrandShop(data) {
    return post('/api/getIndexBrandShop',data);
}
//初始化-首页-旗舰栏(传入的data代表第几栏)的货物图片
export function getIndexBrandShopGoods(data) {
    return post('/api/getIndexBrandShopGoods',data);
}
//获取-搜索页-提交分类对应的过滤栏
export function getSearchCategoryFilterBrand(data) {
    return post('/api/getSearchCategoryFilterBrand',data);
}
//获取-搜索页-搜索结果
export function getSearchResult(data) {
    return post('/api/getSearchResult',data);
}
//获取商品介绍富文本
export function getDetailspecific(){
    return post('/api/getDetailspecific');
}
//获取商品评论
export function getDetailcomment(){
    return post('/api/getDetailcomment');
}





//后端接口
//  获取用户购物车
export function getUserShoppingCart(data) {
    return localpost('/shopcart/selectUserShopcartByUid',data);
}


//获取推荐商品
export function getIndexRecommendGoodsLists(){
    return localpost('/product/getIndexRecommendGoodsLists');
}
//获取旗舰商品
export function getIndexBrandsGoodsLists(data){
    return localpost('/product/getIndexBrandsGoodsLists',data);
}

//获取商品详情
export function getGoodsDetail(gid){
    return localget('/product/getGoodsDetail',gid);
}
export function test(){
    return localpost('/test');
}

//获取用户订单
export function getUserOrder(data){
    return localpost('/order/getUserOrder',data);
}

//获取商品分类、具体商品
export function getSearchCategoryFilterList(data){
    return localpost('/Search/Bytname',data);
}

export function getfilterlist(data){
    return localpost('/Search/Byfilterlist',data);
}

export function getShoplist(data){
    return localpost('/Search/Bytid',data)
}

export function getProductByname(data){
    return localpost('/Search/selectBygname',data)
}

//获取商品该用户评论信息
export function getProductUserComment(data){
    return localpost('/comment/selectByUidAndGid',data)
}
//登录验证
export function Tologin(data){
    return localpost('/user/login',data)
}

//获取该商品评论信息
export function getProductComment(data){
    return localpost('/comment/getProductComment',data)
}